package com.cooksys.film_rental.bo;

import java.util.List;

import com.cooksys.film_rental.model.Customer;
import com.cooksys.film_rental.model.Payment;
import com.cooksys.film_rental.model.Rental;
import com.cooksys.film_rental.model.Staff;

/**
 * Business object for the {@link Payment} class
 * 
 * @author Peter Zastoupil
 * 
 */
public interface PaymentBo {

	/**
	 * 
	 * @param paymentId
	 *            the paymentId to search by
	 * @return the {@link Payment} object associated with the given paymentId
	 */
	public Payment getPaymentByPaymentId(Short paymentId);

	/**
	 * 
	 * @param paymentId
	 *            String representation of the paymentId to search by
	 * @return the {@link Payment} object associated with the given paymentId
	 */
	public Payment getPaymentByPaymentId(String paymentId);

	/**
	 * 
	 * @param staff
	 *            the {@link Staff} to search by
	 * @return a List of {@link Payment} objects associated with the given staff
	 */
	public List<Payment> searchPaymentsByStaff(Staff staff);

	/**
	 * 
	 * @param customer
	 *            the {@link Customer} to search by
	 * @return a List of {@link Payment} objects associated with the given
	 *         customer
	 */
	public List<Payment> searchPaymentsByCustomer(Customer customer);

	/**
	 * 
	 * @param rental
	 *            the {@link Rental} to search by
	 * @return a List of {@link Payment} objects associated with the given
	 *         rental
	 */
	public List<Payment> searchPaymentsByRental(Rental rental);

	/**
	 * 
	 * @param payment
	 *            the {@link Payment} object to be saved in the database
	 * @return the {@link Payment} object that was saved in the database
	 */
	public Payment save(Payment payment);

}
